1. Field of the Invention
The present invention relates to encoding and decoding of video data and, more particularly, to a method of and apparatus for lossless video encoding and decoding, in which a differential residual block generated by calculating a difference between pixels of a residual block resulting from interprediction is encoded, thereby improving the compression rate.
2. Description of the Related Art
H.264/moving picture expert group (MPEG)-4/advanced video coding (AVC), one of the video compression standards, uses various techniques such as multiple reference motion compensation, loop filtering, variable block size motion compensation, and context adaptive binary arithmetic coding (CABAC) to improve the compression rate.
According to the H.264 standard, a picture is divided into macroblocks for video encoding. After each of the macroblocks is encoded in all interprediction and intraprediction encoding modes, an appropriate encoding mode is selected according to the bit rates required for encoding the macroblocks and the degree of distortion between the original macroblock and a decoded macroblock. Then, the macroblock is encoded in the selected encoding mode. Interprediction involves performing prediction on a macroblock of a current frame by referring to a macroblock of a neighboring frame. Intraprediction involves performing prediction on a current macroblock of a current frame using a neighboring macroblock of the current macroblock within the current frame.
Video encoding includes lossy encoding and lossless encoding. For lossless encoding, a difference between a predicted block and a current block, i.e., a residual signal, is directly entropy-encoded without undergoing discrete cosine transform (DCT). According to the prior art, the residual signal, i.e., a residual block, is entropy-encoded without undergoing a separate process or a differential value formed using pixel values of a neighboring block of the residual block is entropy-encoded, thereby degrading the compression rate and making parallel processing using a pipeline method difficult.